<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>我的影票</title>
  <link th:href="@{/images/logo.svg}" rel="icon" type="image/svg+xml">
  <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
  <link th:href="@{/css/bootstrap-icons.min.css}" rel="stylesheet">
</head>
<body>
<header>
  <ul class="nav nav-tabs m-2">
    <li class="nav-item">
      <a class="nav-link disabled" th:href="@{/me}">
        <i class="bi bi-person-circle"></i>
        <span class="ms-1" th:text="${user.getUsername()}"></span>
      </a>
    </li>
    <li class="nav-item">
      <a class="nav-link" th:href="@{/showing}">
        <i class="bi bi-camera-reels"></i>
        <span class="ms-1">放映日程</span>
      </a>
    </li>
    <li class="nav-item">
      <a class="nav-link">
        <i class="bi bi-film"></i>
        <span class="ms-1">热映电影</span>
      </a>
    </li>
    <li class="nav-item">
      <a class="nav-link active" th:href="@{/my-tickets}">
        <i class="bi bi-wallet2"></i>
        <span class="ms-1">我的影票</span>
      </a>
    </li>
    <li class="nav-item ms-auto">
      <a class="nav-link" th:href="@{/me}">
        <i class="bi bi-person-gear"></i>
        <span class="ms-1">账号管理</span>
      </a>
    </li>
  </ul>
</header>
<main>
  <table class="table">
    <thead>
    <tr>
      <th>编号</th>
      <th>电影</th>
      <th>放映日期</th>
      <th>开始时间</th>
      <th>结束时间</th>
      <th>放映厅</th>
      <th>状态</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="ticket : ${tickets}">
      <td th:text="${ticket.getId()}"></td>
      <td th:text="${ticket.getScreening().getMovie().getTitle()}"></td>
      <td th:text="${ticket.getScreening().getStartTime().toLocalDate()}"></td>
      <td th:text="${ticket.getScreening().getStartTime().toLocalTime()}"></td>
      <td th:text="${ticket.getScreening().getEndTime().toLocalTime()}"></td>
      <td th:text="${ticket.getScreening().getHall().getName()}"></td>
      <td th:text="${ticket.getStatus().getDisplayName()}"></td>
    </tr>
    </tbody>
  </table>
</main>
<script th:src="@{/js/axios.min.js}"></script>
<script th:src="@{/js/bootstrap.bundle.min.js}"></script>
<script>

</script>
</body>
</html>